package Book;

public class Book {
    private String bookName;
    private String author;
    private int price;
    private  String types;
    private boolean isBorrow;

    public Book(String bookName, String author, int price, String types, boolean isBorrow) {
        this.bookName = bookName;
        this.author = author;
        this.price = price;
        this.types = types;
        this.isBorrow = isBorrow;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getTypes() {
        return types;
    }

    public void setTypes(String types) {
        this.types = types;
    }

    public boolean isBorrow() {
        return isBorrow;
    }

    public void setBorrow(boolean borrow) {
        isBorrow = borrow;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", types='" + types + '\'' +
                ", isBorrow=" + (isBorrow==false? "未被借出":"已被借出")+
                '}';
    }
}
